package com.xinhe.web.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "商品规格详情")
@Table(name = "tb_goods_price")
public class GoodsPrice {
    @Id
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("商品id")
    private Long goodsId;
    @ApiModelProperty("规格名称")
    private String name;
    @ApiModelProperty("商品售价/单价")
    private BigDecimal price = BigDecimal.ZERO;

    @ApiModelProperty("原价")
    private BigDecimal originalPrice = BigDecimal.ZERO;

    @ApiModelProperty("秒杀价")
    private BigDecimal seckillPrice = BigDecimal.ZERO;

    @ApiModelProperty("团购价格")
    private BigDecimal groupPurchasePrice = BigDecimal.ZERO;

    @ApiModelProperty("单位")
    private String unit;
}
